package com.raise.drive.model.domain;

import com.raise.drive.model.domain.type.QuestionType;
import com.raise.drive.model.domain.type.QuestionPlace;

import java.util.ArrayList;
import java.util.List;
import java.util.HashSet;
import java.util.Set;

/**
 * Question is a main part of each test. It consists from text of the question and some answers.
 * It could be some right answers or only one.
 * 
 * Author: Evgeny Morozov
 */
public class Question extends Persistent {

    /**
     * Version of question edition
     */
    private String version;

    /**
     * Text of the question
     */
    private String questionText;

    /**
     * List of the answers
     */
    private Set<Answer> answers = new HashSet<Answer>();

    /**
     * List of right answers
     */
    private Set<Answer> rightAnswers = new HashSet<Answer>();

    /**
     * The place where question is. It could be just created, approved and "forgotten"
     */
    private QuestionPlace questionPlace;

    /**
     * Ratings of this question given to it by users.
     */
    private Set<Rating> ratings = new HashSet<Rating>();

    /**
     * Describing right answer of this question. Links to documentation,
     * some samples or smth else.
     */
    private String description;

    /**
     * Comments for question
     */
    private Set<Comment> comments = new HashSet<Comment>();

    
    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getQuestionText() {
        return questionText;
    }

    public void setQuestionText(String questionText) {
        this.questionText = questionText;
    }

    public Set<Answer> getAnswers() {
        return answers;
    }

    public void setAnswers(Set<Answer> answers) {
        this.answers = answers;
    }

    public Set<Answer> getRightAnswers() {
        return rightAnswers;
    }

    public void setRightAnswers(Set<Answer> rightAnswers) {
        this.rightAnswers = rightAnswers;
    }

    public QuestionPlace getQuestionPlace() {
        return questionPlace;
    }

    public void setQuestionPlace(QuestionPlace questionPlace) {
        this.questionPlace = questionPlace;
    }

    public Set<Rating> getRatings() {
        return ratings;
    }

    public void setRatings(Set<Rating> ratings) {
        this.ratings = ratings;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Set<Comment> getComments() {
        return comments;
    }

    public void setComments(Set<Comment> comments) {
        this.comments = comments;
    }
}
